﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SynoManager.DownloadStation.Search
{
    /// <summary>
    /// Interface that can be implemented to display search results
    /// </summary>
    public interface ISearchResult
    {
        /// <summary>Gets the title of the result.</summary>
        string Title { get; }
        /// <summary>Gets the filesize of the result.</summary>
        long Size { get; }
        /// <summary>Gets the category for the result.</summary>
        string Category { get; }
        /// <summary>Gets the download url.</summary>
        string DownloadUrl { get; }
        /// <summary>Gets the url for more information.</summary>
        string MoreInfoUrl { get; }
        /// <summary>Gets the number of available seeders.</summary>
        int Seeders { get; }
        /// <summary>Gets the number of available leechers.</summary>
        int Leechers { get; }

        /// <summary>
        /// Gets or sets the mode for providing results
        /// </summary>
        ResultMode ResultMode { get; set; }
    }

    /// <summary>
    /// Enumeration that holds the result modes.
    /// </summary>
    public enum ResultMode
    {
        /// <summary>If the information is already known, show it, otherwise return null or -1.</summary>
        Lazy,
        /// <summary>If the information is not known, try to retrieve it, if it can't be retrieved return null or -1.</summary>
        Full
    }
}
